home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #1 / Amiga Plus CD - 2000 - No. 1.iso / Tools / Dev / mamesrc / src / amiga / file.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-12-03  |  1.2 KB  |  53 lines

  1. #ifndef FILE_H
  2. #define FILE_H
  3. /**************************************************************************
  4.  *
  5.  * Copyright (C) 1999 Mats Eirik Hansen (mats.hansen@triumph.no)
  6.  *
  7.  * $Id: file.h,v 1.1 1999/04/28 18:52:08 meh Exp $
  8.  *
  9.  * $Log: file.h,v $
  10.  * Revision 1.1  1999/04/28 18:52:08  meh
  11.  * Initial revision
  12.  *
  13.  *
  14.  *************************************************************************/
  15.  
  16. struct File
  17. {
  18.   BPTR          File;
  19.   LONG          Type;
  20.   UBYTE         Name[256];
  21.   unsigned char *Data;
  22.   int           Length;
  23.   int           Offset;
  24.   unsigned int  CRC;
  25. };
  26.  
  27. #define FILETYPE_NORMAL 0
  28. #define FILETYPE_TMP    1
  29. #define FILETYPE_ZIP    2
  30. #define FILETYPE_CUSTOM 3
  31.  
  32. struct File *OpenFile(const char *dir_name, const char *file_name, int mode);
  33. struct File *OpenFileType(const char *dir_name, const char *file_name, int mode, int filetype);
  34. void        CloseFile(struct File *file);
  35.  
  36. #ifdef POWERUP
  37. #ifdef __PPC__
  38. #include <powerup/gcclib/powerup_protos.h>
  39. #endif
  40.  
  41. #define ReadFile(a,b,c)   PPCRead(a,b,c)
  42. #define WriteFile(a,b,c)  PPCWrite(a,b,c)
  43. #define SeekFile(a,b,c)   PPCSeek(a,b,c)
  44. #else
  45. #include <inline/dos.h>
  46.  
  47. #define ReadFile(a,b,c)   Read(a,b,c)
  48. #define WriteFile(a,b,c)  Write(a,b,c)
  49. #define SeekFile(a,b,c)   Seek(a,b,c)
  50. #endif
  51.  
  52. #endif
  53.